<form id="rating_{$id}" class="rating" title="Average Rating: {round($vote_value/$vote_num, 1)}" action="{$smarty.const.SITE_URL_S}/ratting.html?id={$id}">
  <label for="r1" class="avg">Rate Me!</label>
  <select id="r1">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    <option value="5">5</option>
  </select>
  <input type="button" value="Submit Rating">
</form>
<script type="text/javascript" charset="utf-8">
{if empty($smarty.session.user.id)}
RatingClose = true;
{elseif check_rating($smarty.session.user.id, $id)}
RatingClose = true;
{else}
RatingClose = false;
{/if}
$('#rating_{$id}').rating();

</script>